package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 人员调动申请记录对象 erp_user_transfer_info
 * @author wutao
 * @date 2024-05-31
 */
@TableName ("erp_user_transfer_info")
@ApiModel (value = "erp_user_transfer_info对象", description = "人员调动申请记录")
@Data
public class UserTransferEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 调入公司,关联部门表,level为1
     */
    @ApiModelProperty ("调入公司,关联部门表,level为1")
    @TableField ("company_in_id")
    @Excel (name = "调入公司,关联部门表,level为1")
    private String companyInId;

    /**
     * 调入部门,关联部门表,level为2
     */
    @ApiModelProperty ("调入部门,关联部门表,level为2")
    @TableField ("dept_in_id")
    @Excel (name = "调入部门,关联部门表,level为2")
    private String deptInId;

    /**
     * 调入岗位
     */
    @ApiModelProperty ("调入岗位")
    @TableField ("post_in_id")
    @Excel (name = "调入岗位")
    private String postInId;

    /**
     * 调出公司,关联部门表,level为1
     */
    @ApiModelProperty ("调出公司,关联部门表,level为1")
    @TableField ("company_out_id")
    @Excel (name = "调出公司,关联部门表,level为1")
    private String companyOutId;

    /**
     * 调出部门,关联部门表,level为2
     */
    @ApiModelProperty ("调出部门,关联部门表,level为2")
    @TableField ("dept_out_id")
    @Excel (name = "调出部门,关联部门表,level为2")
    private String deptOutId;

    /**
     * 调出岗位
     */
    @ApiModelProperty ("调出岗位")
    @TableField ("post_out_id")
    @Excel (name = "调出岗位")
    private String postOutId;

    /**
     * 调动人数
     */
    @ApiModelProperty ("调动人数")
    @TableField ("transfer_number")
    @Excel (name = "调动人数")
    private Long transferNumber;

    /**
     * 接收人Id
     */
    @ApiModelProperty ("接收人Id")
    @TableField ("receive_user_id")
    @Excel (name = "接收人Id")
    private String receiveUserId;

    /**
     * 最迟调动日期
     */
    @ApiModelProperty ("最迟调动日期")
    @TableField ("last_transfer_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "最迟调动日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastTransferTime;

    /**
     * 是否返还;1:是;2:否
     */
    @ApiModelProperty ("是否返还;1:是;2:否")
    @TableField ("is_back")
    @Excel (name = "是否返还;1:是;2:否")
    private Integer isBack;

    /**
     * 返还日期,非必填
     */
    @ApiModelProperty ("返还日期,非必填")
    @TableField ("back_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "返还日期,非必填", width = 30, dateFormat = "yyyy-MM-dd")
    private Date backTime;

    /**
     * 是否在用
     */
    @ApiModelProperty ("是否在用")
    @TableField ("is_used")
    @Excel (name = "是否在用")
    private Integer isUsed;

    @Override
    public String toString () {
        return new ToStringBuilder ( this, ToStringStyle.MULTI_LINE_STYLE )
                .append ( "id", getId () )
                .append ( "companyInId", getCompanyInId () )
                .append ( "deptInId", getDeptInId () )
                .append ( "postInId", getPostInId () )
                .append ( "companyOutId", getCompanyOutId () )
                .append ( "deptOutId", getDeptOutId () )
                .append ( "postOutId", getPostOutId () )
                .append ( "transferNumber", getTransferNumber () )
                .append ( "receiveUserId", getReceiveUserId () )
                .append ( "lastTransferTime", getLastTransferTime () )
                .append ( "isBack", getIsBack () )
                .append ( "backTime", getBackTime () )
                .append ( "createBy", getCreateBy () )
                .append ( "createTime", getCreateTime () )
                .append ( "updateTime", getUpdateTime () )
                .append ( "isUsed", getIsUsed () )
                .toString ();
    }
}
